package com.luanye.enjoy.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "recipe")
public class RecipeSearchDTO implements Serializable {

    /**
     * 文章id
     */
    @Id
    private String recipe_id;

    /**
     *  菜名
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String recipe_name;

    /**
     *  步骤
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String steps;

}
